<p><?php echo "$model->content by <b>{$model->user->name}</b>"; ?> 
    <?php
    if (Yii::app()->user->id == $model->user_id) {
        echo CHtml::link('Delete', Yii::app()->getUrlManager()->createUrl('comment/delete', array('id' => $model->id)));
    }
    ?>
    <?php
    if (Yii::app()->user->id == $model->user_id) {
        echo CHtml::link(' Edit', Yii::app()->getUrlManager()->createUrl('comment/update', array('id' => $model->id)));
    }
    ?>

